<?php
/**
 * View AJAX - Contatti della location  LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    17-mag-2011
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */
?>
<script type="text/javascript">
    //<![CDATA[
     
    $(document).ready(function()
    {
	$("#chiudi").click(function(){
	    $.fancybox.close();
	});
    });

    //]]>
</script>


<div id="container" class="fancybox">
    <table cellspacing="0" class="table">
	<caption><strong>Contatti <?php echo $this->data['location_name']?></strong></caption>
	<tbody>
	    <?php
	    if( count( $this->data['location_contacts'] ) ):
		foreach( $this->data['location_contacts'] AS $contact ):
		    ?>
		    <tr>
			<th class="section">Nome:</th>
			<td class="section"><strong><?php echo $contact['contact_firstname'] ?> <?php echo $contact['contact_lastname'] ?></strong></td>
		    </tr>
		    <tr>
			<th>Ruolo:</th>
			<td><?php echo $this->contact_roles[$contact['fab_contacts_role']] ?></td>
		    </tr>
		    <tr>
			<th>Email Principale:</th>
			<td><?php echo $contact['contact_email'] ?></td>
		    </tr>
		    <tr>
			<th>Tel Principale:</th>
			<td><?php echo $contact['contact_phone'] ?></td>
		    </tr>		
		<?php endforeach;
	    else : ?>
	    <tr><th>Nessun Contatto presente</th></tr>
	    <?php endif; ?>
	</tbody>
    </table>    
    <div id="buttons">
	<button id="chiudi" type="reset" name="chiudi" value="chiudi" class="button negative">
	    <img src="/images/admin/cross.png" alt="" />Esci
	</button>	    
    </div>
</div>